from sqlalchemy.orm import Session
from models import TreeData

def get_tree(db: Session, sample_id: int):
    return db.query(TreeData).filter(TreeData.sample_id == sample_id).first()

def get_all_trees(db: Session, skip: int = 0, limit: int = 100):
    return db.query(TreeData).offset(skip).limit(limit).all()